import { prop, Ref } from "@typegoose/typegoose";
import { Base } from "./base";
import { User } from "./user";

/** 文库类 */
export class Docs extends Base {

  @prop({})
  cover?: string;

  @prop({})
  title: string;

  @prop({})
  url: string;

  @prop({})
  tags: string[];

  /** 源 */
  @prop({})
  source?: string;

  @prop({ type: User, ref: () => User })
  author: Ref<User>;
}